home *** CD-ROM | disk | FTP | other *** search
- Path: news.compuserve.com!newsmaster
- From: <75151.03563@compuserve.com>
- Newsgroups: comp.lang.c++
- Subject: VC++ alpha list box implementation question
- Date: 10 Jan 1996 08:33:40 GMT
- Organization: CompuServe Incorporated
- Message-ID: <4cvtl4$7g9@dub-news-svc-3.compuserve.com>
- NNTP-Posting-Host: dd74-136.compuserve.com
- Content-Type: text/plain
- Content-length: 1543
- X-Newsreader: AIR Mosaic (16-bit) version 1.00.198.07
-
-
- mark@mivax.mc.duke.edu (MARK) writes:
- >Using VC++ one can click on the menu selection for "Help", select
- >the "C/C++ Language" from the subsequent list of help choices and then be
- >presented with a "Search" window. As a character is typed into an edit
- >box, a corresponding list box is filled with an alphabetically sorted list
- >of potential topics of interest. The list is further refined with each
- >additional character typed into the edit box, or the entire list is replaced
- >if the edited characters are deleted and a new starting character is typed.
- >
- >I'd like to understand what technique is used to present and control this
- >sort of query from the user. Is it a combination of a single line edit control
- >and a list box or does some control exist that already implements this sort
- >of behavior?
- >
- >Thanks for any thoughts.
- >
-
- The standard combobox control is a combination of a single line edit
- control and a list box.
-
- To get the behavior described above you have to do some work yourself.
- The edit control will send notifications to its parent window
- (WM_COMMAND:EN_CHANGE, & WM_COMMAND:EN_UPDATE) when a
- character is typed in. If you trap that message you can search the listbox
- for the string that best matches what is currently in the edit control.
- You could do the same thing by subclassing the control and capturing the
- messages that way.
-
- I've done this before and its not that hard. You might be able to find some
- example code around somewhere.
-
- Tom Keane
- 75151,03563@compuserve.com
-
-